import api from "./service";

// 所有的接口都要定义在该文件

export const login = (res)=>{
  return api.post("login",res)
}
// mune菜單
export const getinfoApi = ()=>{
  return api.get("admin/getinfo")
}
// 员工职位及权限列表(職位)
export const role = (data)=>{
  return api.post("role",data)
}
// 权限
export const ruleApi = ()=>{
  return api.post("rule")
}
// 添加員工職位
export const addrRole = (data)=>{
  return api.post("role/create",data)
}
//修改员工职位及权限
export const updateRole = (e)=>{
  return api.post("role/update",e)
}
// 角色刪除
export const delRole = (id)=>{
  return api.post("role/delete",{id})
}
// 学校管理列表
export const SchoolList = (data)=>{
  return api.post("SchoolController",data)
}
// 切換學校
export const getSchool = (school_id)=>{
return api.post('admin/getSchool',{school_id})
}
// 添加学校
export const addSchool = (data)=>{
  return api.post("SchoolController/create",data)
}
// 修改学校
export const updateSchool = (data)=>{
  return api.post("SchoolController/update",data)
}
// 删除学校
export const deleteSchool = (id)=>{
  return api.post("SchoolController/delete",{id})
}
// 教師列表
export const teacherList = (data)=>{
  return api.post("admin",data)
}
// 添加教師
export const addTeacher = (data)=>{
  return api.post("admin/create",data)
}
// 修改教師
export const updateTeacher = (data)=>{
  return api.post("admin/update",data)
}
// 删除教師
export const deleteTeacher = (id)=>{
  return api.post("admin/delete",{id})
}
// 教室列表
export const classroomList = (data)=>{
  return api.post("classroom",data)
}
// 添加教室
export const addClassroom = (data)=>{
  return api.post("classroom/create",data)
}
// 修改教室
export const updateClassroom = (data)=>{
  return api.post("classroom/update",data)
}
// 删除教室
export const deleteClassroom = (id)=>{
  return api.post("classroom/delete",{id})
}
// 編號
export const number = ()=>{
  return api.post("number")
}
// 修改編號
export const numberUpdate = (id,number)=>{
  return api.post("number/update",{id,number})
}
// 學生列表
export const studentList = (data)=>{
  return api.post("student",data)
}
// 獲取學生分類
export const studentType = (data)=>{
  return api.post("studentType",data)
}
// 添加學生分類
export const addStudentType = (data)=>{
  return api.post("studentType/create",data)
}
// 編輯學生分類
export const updateStudentType = (data)=>{
  return api.post("studentType/update",data)
}
// 刪除學生分類
export const delStudentType = (id)=>{
  return api.post("studentType/delete",{id})
}
// 添加學生
export const addStudent = (data)=>{
  return api.post("student/create",data)
}
// 修改學生
export const updateStudent = (data)=>{
  return api.post("student/update",data)
}
// 刪除學生
export const delStudent = (id)=>{
  return api.post("student/delete",{id})
}
// 導入學生
export const impStudent = (data)=>{
  return api.post("student/conduct",{data})
}

// 课程分类
export const coursecate = (data)=>{
  return api.post("coursecate",data)
}
// 課程列表course
export const course = (data)=>{
  return api.post("course",data)
}
// 添加課程
export const addCourse = (data)=>{
  return api.post("course/create",data)
}
// 修改課程
export const updateCourse = (data)=>{
  return api.post("course/update",data)
}
// 刪除課程
export const delCourse = (id)=>{
  return api.post("course/delete",{id})
}
// 導入課程
export const excelCreate = (data)=>{
  return api.post("course/excelCreate",{data})
}
// 產品列表
export const product = (data)=>{
  return api.post("product",data)
}
// 添加產品
export const addProduct = (data)=>{
  return api.post("product/create",data)
}
// 修改產品
export const updateProduct = (data)=>{
  return api.post("product/update",data)
}
// 刪除產品
export const delProduct = (id)=>{
  return api.post("product/delete",{id})
}
// 導入產品
export const productExcel = (data)=>{
  return api.post("product/excelcreate",{data})
}

// 批量停售
export const updateStatusProduct = (id)=>{
  return api.post('product/updateStatus',{id})
}
// 產品分類
export const producttype = (data)=>{
  return api.post("producttype",data)
}
// 添加產品分類
export const addProducttype = (data)=>{
  return api.post("producttype/create",data)
}
// 修改產品分類
export const updateProducttype = (data)=>{
  return api.post("producttype/update",data)
}
// 刪除產品分類
export const delProducttype = (id)=>{
  return api.post("producttype/delete",{id})
}

// 產品品牌
export const brand = (data)=>{
  return api.post("brand",data)
}
// 添加產品品牌
export const addBrand = (data)=>{
  return api.post("brand/create",data)
}
// 修改產品品牌
export const updateBrand = (data)=>{
  return api.post("brand/update",data)
}
// 刪除產品品牌
export const delBrand = (id)=>{
  return api.post("brand/delete",{id})
}

// 產品供應商
export const supplier = (data)=>{
  return api.post("supplier",data)
}
// 添加產品供應商
export const addSupplier = (data)=>{
  return api.post("supplier/create",data)
}
// 修改產品供應商
export const updateSupplier = (data)=>{
  return api.post("supplier/update",data)
}
// 刪除產品供應商
export const delSupplier = (id)=>{
  return api.post("supplier/delete",{id})
}

// 產品單位
export const unit = (data)=>{
  return api.post("unit",data)
}
// 添加產品單位
export const addUnit = (data)=>{
  return api.post("unit/create",data)
}
// 修改產品單位
export const updateUnit = (data)=>{
  return api.post("unit/update",data)
}
// 刪除產品單位
export const delUnit = (id)=>{
  return api.post("unit/delete",{id})
}
// 產品組合列表
export const productgroup = (data)=>{
  return api.post("productGroup",data)
}
// 添加產品組合
export const addProductgroup = (data)=>{
  return api.post("productGroup/create",data)
}
// 修改產品組合
export const updateProductgroup = (data)=>{
  return api.post("productGroup/update",data)
}
// 刪除產品組合
export const delProductgroup = (id)=>{
  return api.post("productGroup/delete",{id})
}
// 套票列表
export const tickets = (data)=>{
  return api.post("tickets",data)
}
// 添加套票
export const addTickets = (data)=>{
  return api.post("tickets/create",data)
}
// 修改套票
export const updateTickets = (data)=>{
  return api.post("tickets/update",data)
}
// 刪除套票
export const delTickets = (id)=>{
  return api.post("tickets/delete",{id})
}
// 學生公告
export const annunciates = (data)=>{
  return api.post("annunciates",data)
}
// 添加學生公告
export const addAnnunciates = (data)=>{
  return api.post("annunciates/create",data)
}
// 修改學生公告
export const updateAnnunciates = (data)=>{
  return api.post("annunciates/update",data)
}
// 刪除學生公告
export const deleteAnnunciates = (id)=>{
  return api.post("annunciates/delete",{id})
}
// 特別折扣
export const discounts = (data)=>{
  return api.post("discounts",data)
}
// 添加特別折扣
export const addDiscounts = (data)=>{
  return api.post("discounts/create",data)
}
// 修改特別折扣
export const updateDiscounts = (data)=>{
  return api.post("discounts/update",data)
}
// 刪除特別折扣
export const delDiscounts = (id)=>{
  return api.post("discounts/delete",{id})
}
// 付款方式
export const payment = (data)=>{
  return api.post("payment",data)
}
// 添加付款方式
export const addPayment = (data)=>{
  return api.post("payment/create",data)
}
// 修改付款方式
export const updatePayment = (data)=>{
  return api.post("payment/update",data)
}
// 刪除付款方式
export const delPayment = (id)=>{
  return api.post("payment/delete",{id})
}
// 支出項目
export const expend = (data)=>{
  return api.post("expend",data)
}
// 添加支出項目
export const addExpend = (data)=>{
  return api.post("expend/create",data)
}
// 修改支出項目
export const updateExpend = (data)=>{
  return api.post("expend/update",data)
}
// 刪除支出項目
export const delExpend = (id)=>{
  return api.post("expend/delete",{id})
}
// 收據備註（type:1）or客戶須知（type:2）
export const content = (data)=>{
  return api.post("content",data)
}
// 添加收據備註or客戶須知
export const addContent = (data)=>{
  return api.post("content/create",data)
}
// 修改收據備註or客戶須知
export const updateContent = (data)=>{
  return api.post("content/update",data)
}
// 刪除收據備註or客戶須知
export const delContent = (id)=>{
  return api.post("content/delete",{id})
}
// 預設學生
export const presuppose = (data)=>{
  return api.post("presuppose",data) 
}
// 添加預設學生
export const addPresuppose = (data)=>{
  return api.post("presuppose/create",data) 
}
// 修改預設學生
export const updatePresuppose = (data)=>{
  return api.post("presuppose/update",data) 
}
// 刪除預設學生
export const delPresuppose = (id)=>{
  return api.post("presuppose/delete",{id}) 
}
// 發票列表
export const invoice = (data)=>{
  return api.post("invoice",data)
}
// 添加發票
export const addInvoice = (data)=>{
  return api.post("invoice/create",data)
}
// 修改發票
export const updateInvoice = (data)=>{
  return api.post("invoice/update",data)
}
// 刪除發票
export const delInvoice = (id)=>{
  return api.post("invoice/delete",{id})
}

// 收款列表
export const proceeds = (data)=>{
  return api.post("proceeds",data)
}
// 添加收款
export const addProceeds = (data)=>{
  return api.post("proceeds/create",data)
}
// 編輯收款
export const updateProceeds = (data)=>{
  return api.post("proceeds/update",data)
}
// 刪除收款
export const delProceeds = (id)=>{
  return api.post("proceeds/delete",{id})
}
// 快速收款
export const fastcreate = (data)=>{
  return api.post("proceeds/fastcreate",data)
}

//退款
export const refund = (data)=>{
  return api.post("refund",data) 
}
//添加退款
export const addRefund = (data)=>{
  return api.post("refund/create",data) 
}
//编辑退款
export const updateRefund = (data)=>{
  return api.post("refund/update",data) 
}
//刪除退款
export const delRefund = (id)=>{
  return api.post("refund/delete",{id}) 
}
//支出
export const expense = (data)=>{
  return api.post("expense",data) 
}
//添加支出
export const addExpense = (data)=>{
  return api.post("expense/create",data) 
}
//编辑支出
export const updateExpense = (data)=>{
  return api.post("expense/update",data) 
}
//刪除支出
export const delExpense = (id)=>{
  return api.post("expense/delete",{id}) 
}
//入倉列表
export const warehousing = (data)=>{
  return api.post("warehousing",data) 
}
//添加入倉
export const addWarehousing = (data)=>{
  return api.post("warehousing/create",data) 
}
//編輯入倉
export const updateWarehousing = (data)=>{
  return api.post("warehousing/update",data) 
}
//刪除入倉
export const delWarehousing = (id)=>{
  return api.post("warehousing/delete",{id}) 
}
//出仓列表
export const tokes = (data)=>{
  return api.post("tokes",data) 
}
//添加出仓
export const addTokes = (data)=>{
  return api.post("tokes/create",data) 
}
//修改出仓
export const updateTokes = (data)=>{
  return api.post("tokes/update",data) 
}
//刪除出仓
export const delTokes = (id)=>{
  return api.post("tokes/delete",{id}) 
}
//轉倉列表
export const rolltokes = (data)=>{
  return api.post("rolltokes",data) 
}
//添加轉倉
export const addRolltokes = (data)=>{
  return api.post("rolltokes/create",data) 
}
//修改轉倉
export const updateRolltokes = (data)=>{
  return api.post("rolltokes/update",data) 
}
//刪除轉倉
export const delRolltokes = (data)=>{
  return api.post("rolltokes/delete",data) 
}
//点仓
export const warehouse = (data)=>{
  return api.post("warehouse",data) 
}
//更新点仓
export const updateWarehouse = (data)=>{
  return api.post("warehouse/update",data) 
}
// 导出学生资料報表
export const studentDerive = (data)=>{
  return api.post("student/derive",data) 
}
// 消費
export const consume = (data)=>{
  return api.post("student/consume",data) 
}
// 欠款student/arrearage
export const arrearage = (data)=>{
  return api.post("student/arrearage",data) 
}
// 报名验证
export const verificationClass = (data)=>{
  return api.post("invoice/verificationClass",data) 
}
// 首頁統計
export const panel = (data)=>{
  return api.post("index/panel",data) 
}
// 首頁折線圖
export const graph = (data)=>{
  return api.post("index/graph",data) 
}
//时间表
export const classTime = (data)=>{
  return api({
    url:"classroom/classTime",
    method:'get',
    params:{...data}
  })
  console.log(data);
  return api.get(`classroom/classTime`,{params:data}) 
}
// 時間表修改
export const classroomEdit = (data)=>{
  return api.post("classroom/edit",data) 
}
// 学生購買的套票
export const getTickets = (data)=>{
  return api.post("student/getTicket",data) 
}

// 套票延時
export const lengthenTime = (data)=>{
  return api.post("student/lengthenTime",data) 
}
// 未點名名單
export const getAppeared = (data)=>{
  return api.post("classroom/getAppeared",data) 
}
// 时间表操作記錄
export const timeLog = (data)=>{
  return api.post("classroom/timeLog",data) 
}
// 删除时间表操作記錄
export const timeLogDel = (id)=>{
  return api.post("classroom/timeLogDel",{id}) 
}
// 學生報名課程
export const getSign = (data)=>{
  return api.post("student/getSign",data) 
}
// 學生调堂
export const studentHall = (data)=>{
  return api.post("student/edit",data) 
}
// 登記套票驗證
export const checkTickets = (data)=>{
  return api.post("tickets/checkTickets",data) 
}
// 使用套票
export const useTickets = (data)=>{
  return api.post("tickets/useTickets",data) 
}

// import {SchoolList} from '@/http/index.js'